#ifndef __FR__LINESPATIALOBJECT__H__
#define __FR__LINESPATIALOBJECT__H__

#include <itkSpatialObject.h>

namespace fr
{
  /**
   */
  template< class P >
  class LineSpatialObject
    : public itk::SpatialObject< P::PointDimension >
  {
  public:
    typedef LineSpatialObject                       Self;
    typedef itk::SpatialObject< P::PointDimension > Superclass;
    typedef itk::SmartPointer < Self >              Pointer;
    typedef itk::SmartPointer < const Self >        ConstPointer;

    typedef P TPoint;
    typedef typename TPoint::ValueType  TScalar;
    typedef typename TPoint::VectorType TVector;

    itkStaticConstMacro( Dimension, unsigned int, P::PointDimension );

  public:
    itkNewMacro( Self );
    itkTypeMacro( LineSpatialObject, itkSpatialObject );

    itkGetConstMacro( Point0, TPoint );
    itkGetConstMacro( Point1, TPoint );

    itkSetMacro( Point0, TPoint );
    itkSetMacro( Point1, TPoint );

  public:
    virtual bool ValueAt(
      const TPoint& point,
      double& value,
      unsigned int depth = 0,
      char* name = NULL
      ) const;
    virtual bool IsEvaluableAt(
      const TPoint& point,
      unsigned int depth = 0,
      char* name = NULL
      ) const;
    virtual bool IsInside(
      const TPoint& point,
      unsigned int depth = 0,
      char* name = NULL
      ) const;
    void CopyInformation( const itk::DataObject* data );

  protected:
    LineSpatialObject( );
    virtual ~LineSpatialObject( );

  private:
    LineSpatialObject( const Self& ); // Not impl.
    void operator=( const Self& );    // Not impl.

  protected:
    TPoint m_Point0;
    TPoint m_Point1;
  };

} // ecapseman

#include <frLineSpatialObject.txx>

#endif // __FR__LINESPATIALOBJECT__H__

// eof - $RCSfile$
